<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>AndBase开发框架: com.ab.http.AbHttpUtil类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="ic_launcher.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">AndBase开发框架
   &#160;<span id="projectnumber">1.6</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.8 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="pages.html"><span>相关页面</span></a></li>
      <li><a href="namespaces.html"><span>命名空间</span></a></li>
      <li class="current"><a href="annotated.html"><span>类</span></a></li>
      <li><a href="files.html"><span>文件</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>类列表</span></a></li>
      <li><a href="classes.html"><span>类索引</span></a></li>
      <li><a href="hierarchy.html"><span>类继承关系</span></a></li>
      <li><a href="functions.html"><span>类成员</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>全部</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>类</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>命名空间</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>文件</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>函数</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>变量</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>枚举值</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>页</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacecom.html">com</a></li><li class="navelem"><a class="el" href="namespacecom_1_1ab.html">ab</a></li><li class="navelem"><a class="el" href="namespacecom_1_1ab_1_1http.html">http</a></li><li class="navelem"><a class="el" href="classcom_1_1ab_1_1http_1_1_ab_http_util.html">AbHttpUtil</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="#pri-methods">Private 成员函数</a> &#124;
<a href="#pri-attribs">Private 属性</a> &#124;
<a href="#pri-static-attribs">静态 Private 属性</a> &#124;
<a href="classcom_1_1ab_1_1http_1_1_ab_http_util-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">com.ab.http.AbHttpUtil类 参考</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a8ffeb86210bb75f01df96d45502dfe4d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1http_1_1_ab_http_util.html#a8ffeb86210bb75f01df96d45502dfe4d">get</a> (String url, <a class="el" href="classcom_1_1ab_1_1http_1_1_ab_http_response_listener.html">AbHttpResponseListener</a> responseListener)</td></tr>
<tr class="separator:a8ffeb86210bb75f01df96d45502dfe4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a79812fd99559342ec617e8ecc96bf144"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1http_1_1_ab_http_util.html#a79812fd99559342ec617e8ecc96bf144">get</a> (String url, <a class="el" href="classcom_1_1ab_1_1http_1_1_ab_request_params.html">AbRequestParams</a> params, <a class="el" href="classcom_1_1ab_1_1http_1_1_ab_http_response_listener.html">AbHttpResponseListener</a> responseListener)</td></tr>
<tr class="separator:a79812fd99559342ec617e8ecc96bf144"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a55a97a4c6020a599eb0d2d18ea44979e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1http_1_1_ab_http_util.html#a55a97a4c6020a599eb0d2d18ea44979e">get</a> (String url, <a class="el" href="classcom_1_1ab_1_1http_1_1_ab_binary_http_response_listener.html">AbBinaryHttpResponseListener</a> responseListener)</td></tr>
<tr class="separator:a55a97a4c6020a599eb0d2d18ea44979e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7dcdada6f7a7fac7d49f3e5e52f082eb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1http_1_1_ab_http_util.html#a7dcdada6f7a7fac7d49f3e5e52f082eb">get</a> (String url, <a class="el" href="classcom_1_1ab_1_1http_1_1_ab_request_params.html">AbRequestParams</a> params, <a class="el" href="classcom_1_1ab_1_1http_1_1_ab_file_http_response_listener.html">AbFileHttpResponseListener</a> responseListener)</td></tr>
<tr class="separator:a7dcdada6f7a7fac7d49f3e5e52f082eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac34f6793412437d69aacad14eed238bc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1http_1_1_ab_http_util.html#ac34f6793412437d69aacad14eed238bc">post</a> (String url, <a class="el" href="classcom_1_1ab_1_1http_1_1_ab_http_response_listener.html">AbHttpResponseListener</a> responseListener)</td></tr>
<tr class="separator:ac34f6793412437d69aacad14eed238bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4433e4760e11ac33898cae03f8d120da"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1http_1_1_ab_http_util.html#a4433e4760e11ac33898cae03f8d120da">post</a> (String url, <a class="el" href="classcom_1_1ab_1_1http_1_1_ab_request_params.html">AbRequestParams</a> params, <a class="el" href="classcom_1_1ab_1_1http_1_1_ab_http_response_listener.html">AbHttpResponseListener</a> responseListener)</td></tr>
<tr class="separator:a4433e4760e11ac33898cae03f8d120da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4d0ddc093794a6d2881880e2d23aa41"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1http_1_1_ab_http_util.html#aa4d0ddc093794a6d2881880e2d23aa41">post</a> (String url, <a class="el" href="classcom_1_1ab_1_1http_1_1_ab_request_params.html">AbRequestParams</a> params, <a class="el" href="classcom_1_1ab_1_1http_1_1_ab_file_http_response_listener.html">AbFileHttpResponseListener</a> responseListener)</td></tr>
<tr class="separator:aa4d0ddc093794a6d2881880e2d23aa41"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae1e656333a4ea617688983836e306e57"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1http_1_1_ab_http_util.html#ae1e656333a4ea617688983836e306e57">setTimeout</a> (int timeout)</td></tr>
<tr class="separator:ae1e656333a4ea617688983836e306e57"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a00c248c75f12a05dbff29feb4a892d43"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1http_1_1_ab_http_util.html#a00c248c75f12a05dbff29feb4a892d43">setEasySSLEnabled</a> (boolean enabled)</td></tr>
<tr class="separator:a00c248c75f12a05dbff29feb4a892d43"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb4c776f0e25689ebfc17fcb89212ffe"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1http_1_1_ab_http_util.html#aeb4c776f0e25689ebfc17fcb89212ffe">setEncode</a> (String encode)</td></tr>
<tr class="separator:aeb4c776f0e25689ebfc17fcb89212ffe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6485e91ea2ed6197b2a5078e9b787984"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1http_1_1_ab_http_util.html#a6485e91ea2ed6197b2a5078e9b787984">setUserAgent</a> (String userAgent)</td></tr>
<tr class="separator:a6485e91ea2ed6197b2a5078e9b787984"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a092358fa2bde3f6ad8c9a9766142b5f8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1http_1_1_ab_http_util.html#a092358fa2bde3f6ad8c9a9766142b5f8">shutdownHttpClient</a> ()</td></tr>
<tr class="separator:a092358fa2bde3f6ad8c9a9766142b5f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:a58082dbb15167463d8741e779d99e6c3"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classcom_1_1ab_1_1http_1_1_ab_http_util.html">AbHttpUtil</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1http_1_1_ab_http_util.html#a58082dbb15167463d8741e779d99e6c3">getInstance</a> (Context context)</td></tr>
<tr class="separator:a58082dbb15167463d8741e779d99e6c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
Private 成员函数</h2></td></tr>
<tr class="memitem:a8dd05e5fc7ea0eacc66e25f94c1ecf5c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1http_1_1_ab_http_util.html#a8dd05e5fc7ea0eacc66e25f94c1ecf5c">AbHttpUtil</a> (Context context)</td></tr>
<tr class="separator:a8dd05e5fc7ea0eacc66e25f94c1ecf5c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private 属性</h2></td></tr>
<tr class="memitem:ace8586e61c41eee4b1cd7054a723a97b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1ab_1_1http_1_1_ab_http_client.html">AbHttpClient</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1http_1_1_ab_http_util.html#ace8586e61c41eee4b1cd7054a723a97b">mClient</a> = null</td></tr>
<tr class="separator:ace8586e61c41eee4b1cd7054a723a97b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-static-attribs"></a>
静态 Private 属性</h2></td></tr>
<tr class="memitem:a90ea9fefad817c8a6f744e364aca1304"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classcom_1_1ab_1_1http_1_1_ab_http_util.html">AbHttpUtil</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1http_1_1_ab_http_util.html#a90ea9fefad817c8a6f744e364aca1304">mAbHttpUtil</a> = null</td></tr>
<tr class="separator:a90ea9fefad817c8a6f744e364aca1304"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>© 2012 amsoft.cn 名称：AbHttpUtil.java 描述：Http执行工具类，可处理get，post，以及异步处理文件的上传下载</p>
<dl class="section author"><dt>作者</dt><dd>还如一梦中 </dd></dl>
<dl class="section version"><dt>版本</dt><dd>v1.0 </dd></dl>
<dl class="section date"><dt>日期</dt><dd>：2013-10-22 下午4:15:52 </dd></dl>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a class="anchor" id="a8dd05e5fc7ea0eacc66e25f94c1ecf5c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">com.ab.http.AbHttpUtil.AbHttpUtil </td>
          <td>(</td>
          <td class="paramtype">Context&#160;</td>
          <td class="paramname"><em>context</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>初始化AbHttpUtil.</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">context</td><td>the context </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a class="anchor" id="a8ffeb86210bb75f01df96d45502dfe4d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void com.ab.http.AbHttpUtil.get </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>url</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classcom_1_1ab_1_1http_1_1_ab_http_response_listener.html">AbHttpResponseListener</a>&#160;</td>
          <td class="paramname"><em>responseListener</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>描述：无参数的get请求.</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">url</td><td>the url </td></tr>
    <tr><td class="paramname">responseListener</td><td>the response listener </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a79812fd99559342ec617e8ecc96bf144"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void com.ab.http.AbHttpUtil.get </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>url</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classcom_1_1ab_1_1http_1_1_ab_request_params.html">AbRequestParams</a>&#160;</td>
          <td class="paramname"><em>params</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classcom_1_1ab_1_1http_1_1_ab_http_response_listener.html">AbHttpResponseListener</a>&#160;</td>
          <td class="paramname"><em>responseListener</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>描述：带参数的get请求.</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">url</td><td>the url </td></tr>
    <tr><td class="paramname">params</td><td>the params </td></tr>
    <tr><td class="paramname">responseListener</td><td>the response listener </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a55a97a4c6020a599eb0d2d18ea44979e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void com.ab.http.AbHttpUtil.get </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>url</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classcom_1_1ab_1_1http_1_1_ab_binary_http_response_listener.html">AbBinaryHttpResponseListener</a>&#160;</td>
          <td class="paramname"><em>responseListener</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>描述：下载数据使用，会返回byte数据(下载文件或图片).</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">url</td><td>the url </td></tr>
    <tr><td class="paramname">responseListener</td><td>the response listener </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a7dcdada6f7a7fac7d49f3e5e52f082eb"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void com.ab.http.AbHttpUtil.get </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>url</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classcom_1_1ab_1_1http_1_1_ab_request_params.html">AbRequestParams</a>&#160;</td>
          <td class="paramname"><em>params</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classcom_1_1ab_1_1http_1_1_ab_file_http_response_listener.html">AbFileHttpResponseListener</a>&#160;</td>
          <td class="paramname"><em>responseListener</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>描述：文件下载的get.</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">url</td><td>the url </td></tr>
    <tr><td class="paramname">params</td><td>the params </td></tr>
    <tr><td class="paramname">responseListener</td><td>the response listener </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a58082dbb15167463d8741e779d99e6c3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classcom_1_1ab_1_1http_1_1_ab_http_util.html">AbHttpUtil</a> com.ab.http.AbHttpUtil.getInstance </td>
          <td>(</td>
          <td class="paramtype">Context&#160;</td>
          <td class="paramname"><em>context</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>描述：获取实例.</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">context</td><td>the context </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>single instance of <a class="el" href="classcom_1_1ab_1_1http_1_1_ab_http_util.html">AbHttpUtil</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ac34f6793412437d69aacad14eed238bc"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void com.ab.http.AbHttpUtil.post </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>url</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classcom_1_1ab_1_1http_1_1_ab_http_response_listener.html">AbHttpResponseListener</a>&#160;</td>
          <td class="paramname"><em>responseListener</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>描述：无参数的post请求.</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">url</td><td>the url </td></tr>
    <tr><td class="paramname">responseListener</td><td>the response listener </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a4433e4760e11ac33898cae03f8d120da"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void com.ab.http.AbHttpUtil.post </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>url</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classcom_1_1ab_1_1http_1_1_ab_request_params.html">AbRequestParams</a>&#160;</td>
          <td class="paramname"><em>params</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classcom_1_1ab_1_1http_1_1_ab_http_response_listener.html">AbHttpResponseListener</a>&#160;</td>
          <td class="paramname"><em>responseListener</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>描述：带参数的post请求.</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">url</td><td>the url </td></tr>
    <tr><td class="paramname">params</td><td>the params </td></tr>
    <tr><td class="paramname">responseListener</td><td>the response listener </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aa4d0ddc093794a6d2881880e2d23aa41"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void com.ab.http.AbHttpUtil.post </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>url</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classcom_1_1ab_1_1http_1_1_ab_request_params.html">AbRequestParams</a>&#160;</td>
          <td class="paramname"><em>params</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classcom_1_1ab_1_1http_1_1_ab_file_http_response_listener.html">AbFileHttpResponseListener</a>&#160;</td>
          <td class="paramname"><em>responseListener</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>描述：文件下载的post.</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">url</td><td>the url </td></tr>
    <tr><td class="paramname">params</td><td>the params </td></tr>
    <tr><td class="paramname">responseListener</td><td>the response listener </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a00c248c75f12a05dbff29feb4a892d43"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void com.ab.http.AbHttpUtil.setEasySSLEnabled </td>
          <td>(</td>
          <td class="paramtype">boolean&#160;</td>
          <td class="paramname"><em>enabled</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>打开ssl 自签名(第一次请求前设置). </p><dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">enabled</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aeb4c776f0e25689ebfc17fcb89212ffe"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void com.ab.http.AbHttpUtil.setEncode </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>encode</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置编码(第一次请求前设置). </p><dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">encode</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ae1e656333a4ea617688983836e306e57"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void com.ab.http.AbHttpUtil.setTimeout </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>timeout</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>描述：设置连接超时时间(第一次请求前设置).</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">timeout</td><td>毫秒 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a6485e91ea2ed6197b2a5078e9b787984"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void com.ab.http.AbHttpUtil.setUserAgent </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>userAgent</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置用户代理(第一次请求前设置). </p><dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">userAgent</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a092358fa2bde3f6ad8c9a9766142b5f8"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void com.ab.http.AbHttpUtil.shutdownHttpClient </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>关闭HttpClient 当HttpClient实例不再需要是，确保关闭connection manager，以释放其系统资源 </p>

</div>
</div>
<h2 class="groupheader">类成员变量说明</h2>
<a class="anchor" id="a90ea9fefad817c8a6f744e364aca1304"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classcom_1_1ab_1_1http_1_1_ab_http_util.html">AbHttpUtil</a> com.ab.http.AbHttpUtil.mAbHttpUtil = null</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>工具类单例. </p>

</div>
</div>
<a class="anchor" id="ace8586e61c41eee4b1cd7054a723a97b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classcom_1_1ab_1_1http_1_1_ab_http_client.html">AbHttpClient</a> com.ab.http.AbHttpUtil.mClient = null</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>实例化单例对象. </p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>src/com/ab/http/<a class="el" href="_ab_http_util_8java.html">AbHttpUtil.java</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
生成于 2014年 十一月 6日 星期四 11:22:02 , 为 AndBase开发框架使用  &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.8
</small></address>
</body>
</html>
